package com.example.ware.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.ware.model.po.Record;
import com.example.ware.model.responseData.ResponseData;
import com.example.ware.model.vo.RecordVo;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface RecordMapper extends BaseMapper<Record> {

//    注解
//    搜索进出的历史记录
    @Select("select r.id,r.subtime,r.entrytime,c.name,e.username from record r left join classify c on r.cid=c.id left join declares d on r.did=d.id  left join employees e on e.id=d.eid")
    public List<RecordVo> getList();



//    xml
//    搜索进出的历史记录(分页)
    public List<RecordVo> getReList(String sort,String cid,String wid,Integer pageNum, Integer pageSize);
//    搜索进出的历史记录(所有)
    public List<RecordVo> getReListAll(String cid,String wid);


//    根据did获取对应的记录
    @Select("select * from record where did=#{did}")
    public Record getOne(String did);



}
